-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add fixes for block-lang rule #844
Conversation
🦋 Changeset detectedLatest commit: 6dba947 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR!
I think changing the lang
attribute may break the component.
Auto-fix needs to be safe, so could you change it to use the suggestions API instead?
If multiple langs are allowed, we could show multiple suggestions.
commit: |
output: | | ||
<script lang="javascript"></script> | ||
|
||
<style lang="javascript"></style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. I will fix this but I need to go outside now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon carefully reviewing the test cases, this is correct.😇
I wanted eslint to automatically fix script/style errors from the block-lang rule.
The
lang
fixes will only apply when a script/style config value contains only a single, non-null value.The same logic applies to the
style
tag except will create at the bottom of the file